package xyz.luhui1hao.sell.utils;

import java.util.Random;

/**
 * @ClassName KeyUtil
 * @Description TODO
 * @Author luhui1hao
 * @Date 2018/8/22 下午1:36
 * @Version 1.0
 */
public class KeyUtil {

    /**
     * 生成唯一的主键
     * @return
     */
    public static synchronized String genUniqueKey(){
        Random random = new Random();
        Integer number = random.nextInt(900000) + 100000;

        return System.currentTimeMillis() + number + "";
    }
}
